<?php
/* @var $this QShiftController */
/* @var $userA user->iduser */
/* @var $userB user->iduser */
/* @var $week week number*/
/* @var $year year number*/
/* @var $days array of weekday=>date*/

Yii::app()->clientScript->registerScript('tableAjaxHandler', "

					  function updateData(week,year,userA,userB) {
					 
						jQuery.ajax(
							{'type':'GET',
							 'url':'/staffer/index.php/qshift/swap',
							 'data':{'week':week,'year':year,'userId_A':userA,'userId_B':userB,'isAjaxRequest':'1'},
							 'cache':false,
							 'success':function(html){jQuery('#tbl_visor').html(html)}});
						return false;
					  };	  
"
, CClientScript::POS_END);




$this->pageTitle=Yii::app()->name . ' - Swap Q-Shifts';
$this->breadcrumbs=array(
	'Q-Shifts'=>array('/qshift/'),
	'Swap Q-Shifts',
);
?>

<h1>Swap Q-Shifts</h1>
<br>



<div id="tbl_visor">
	<?php 

		$this->renderPartial('_swapContent',
							  array(
									'userA'=>$userA,
									'userB'=>$userB,
									'week'=>$week,
									'year'=>$year,
									'days'=>$days,
									),
							  false,
							  true
							);
	?>
</div>
</center>
